home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1988 / Aug-Sep 88 / Default button woes ⁄ 10.21.88 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.3 KB  |  33 lines  |  [TEXT/GEOL]

  1. Item    1766338                         21-Oct-88        06:25
  2.  
  3. From:   D1430                           HewLett Packard, Dev, Steve Henry
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. cc:     MACDTS                          Macintosh Developer Technical Supt.
  8.  
  9. Sub:    Default button woes
  10.  
  11. I have done some more investigation on my problem of my dialogs in macApp 2.0b5
  12. not responding to the Return key and doing the default button's action.  I have
  13. looked at DemoDailogs and its view resources and mine appear to be the same in
  14. all relevant aspects.  The problem is that the fields fTargetID and fTarget are
  15. not being setup properly by NewTemplateWindow and FindSubView respectively.  It
  16. happens in DemoeDialogs but not in mine.  Below is code that I use in one place
  17. to make it happen as it should but I have several places that I use dialogs and
  18. do not want to have to do this in all of them.
  19.  
  20. aWindow := NewTemplateWindow(vStartupView, NIL);
  21. aWindow.fTargetID := 'DLOG';
  22. aTestDialog := TTestDialog(aWindow.FindSubView('DLOG'));
  23. aWindow.fTarget := aTestDialog;
  24.  
  25.   I would like to get rid of the two lines setting up the fields and get the
  26. resource file right.  What I am I doing wrong?  It must be something very
  27. obvious because I've looked so hard to find it.
  28.  
  29. Hal Hansen
  30. Hewlett Packard
  31.  
  32.  
  33.